# Makefile: libdttools ---------------------------------------------------------

# Copyright (c) 2010 Peter Bui and Aaron Dingler
# This software is distributed the GNU General Public license. 
# See the file COPYING for details.

include ../../Makefile.common

# Compiler and Linker Flags ----------------------------------------------------

CFLAGS = -fPIC

# Specific Targets and Objects -------------------------------------------------

DTT_STATIC_SRC = catalog_query.c change_process_title.c copy_stream.c \
		 create_dir.c datagram.c delete_dir.c debug.c \
		 domain_name.c domain_name_cache.c \
		 full_io.c hash_cache.c hash_table.c http_query.c \
		 itable.c link.c list.c nvpair.c \
		 process.c sort_dir.c stringtools.c timestamp.c \
		 url_encode.c username.c xmalloc.c
DTT_STATIC_OBJ = $(DTT_STATIC_SRC:.c=.o)
DTT_STATIC_LIB = libdttools.a

SMQ_TARGETS    = int_sizes.h make_int_sizes $(DTT_STATIC_LIB)

# Target Specifications --------------------------------------------------------

$(DTT_STATIC_LIB): $(DTT_STATIC_OBJ) 
	@$(call LINK_MSG,AR,$(RELPATH)$@)
	@$(AR) $(SMQ_ARFLAGS) $@ $^

int_sizes.h: make_int_sizes
	@$(call MAKE_MSG,$(RELPATH)$@)
	@./$< > $@

make_int_sizes: make_int_sizes.o
	@$(call LINK_MSG,LINK,$(RELPATH)$@)
	@$(CC) -o $@ $(SMQ_LINKFLAGS) $< $(SMQ_LINKLIBS) 

# Autogenerated Dependencies ---------------------------------------------------

# DEPENDENCIES

catalog_query.o: catalog_query.c catalog_query.h nvpair.h int_sizes.h \
 catalog_server.h http_query.h link.h xmalloc.h stringtools.h
catalog_server.o: catalog_server.c catalog_server.h datagram.h link.h \
 int_sizes.h hash_cache.h hash_table.h debug.h nvpair.h stringtools.h \
 domain_name_cache.h domain_name.h username.h list.h xmalloc.h macros.h
change_process_title.o: change_process_title.c
copy_stream.o: copy_stream.c copy_stream.h full_io.h int_sizes.h
create_dir.o: create_dir.c debug.h int_sizes.h
datagram.o: datagram.c datagram.h stringtools.h int_sizes.h
debug.o: debug.c debug.h int_sizes.h domain_name_cache.h domain_name.h \
 macros.h stringtools.h full_io.h xmalloc.h
delete_dir.o: delete_dir.c delete_dir.h stringtools.h int_sizes.h
domain_name.o: domain_name.c domain_name.h stringtools.h int_sizes.h \
 debug.h
domain_name_cache.o: domain_name_cache.c domain_name_cache.h \
 domain_name.h hash_cache.h hash_table.h debug.h int_sizes.h
full_io.o: full_io.c full_io.h int_sizes.h
hash_cache.o: hash_cache.c hash_cache.h hash_table.h
hash_table.o: hash_table.c hash_table.h
http_query.o: http_query.c http_query.h link.h int_sizes.h stringtools.h \
 debug.h domain_name.h url_encode.h
itable.o: itable.c itable.h int_sizes.h
link.o: link.c link.h int_sizes.h domain_name.h stringtools.h macros.h \
 full_io.h debug.h
list.o: list.c list.h
make_int_sizes.o: make_int_sizes.c
nvpair.o: nvpair.c nvpair.h int_sizes.h hash_table.h stringtools.h \
 xmalloc.h macros.h
process.o: process.c process.h list.h
sort_dir.o: sort_dir.c sort_dir.h
stringtools.o: stringtools.c stringtools.h int_sizes.h timestamp.h
timestamp.o: timestamp.c timestamp.h int_sizes.h
url_encode.o: url_encode.c url_encode.h
username.o: username.c username.h
xmalloc.o: xmalloc.c debug.h int_sizes.h xmalloc.h

# vim: sts=4 sw=4 ts=8 ft=make
